﻿Imports System.Data.SqlClient
Module Module1
    Public cn As SqlConnection
    Public str As String = "server=.;database=Resturant;UID=sa;PWD=123"
    Public Sub condb()
        Try
            cn = New SqlConnection(str)
            cn.Open()
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

    End Sub

End Module
